package com.ee.chat.api.service.impl;

import com.ee.chat.api.service.ITopService;
import com.ee.chat.common.bean.Result;
import com.ee.chat.common.dao.BaseMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author Shane
 * @Date 2019/8/2 22:34
 */
@Service
public class TopServiceImpl implements ITopService {
    @Resource
    BaseMapper baseMapper;

    @Override
    public Result getUserTop(String token, Integer way, Integer type) throws Exception {
        Map<String, Object> data = new HashMap<>();

        List<Map<String, Object>> tops = baseMapper.getUserCoinConsumeTops(way, type);

        data.put("tops", tops);
        return Result.returnSuccess(data);
    }
}
